package dao

import (
	"yundian/internel/app/models/couponlog"
	"yundian/internel/pkg/dingo"
	"yundian/internel/pkg/dingo/global"
)

type CouponLogDao struct {
}

func NewCouponLogDao() *CouponLogDao {
	return &CouponLogDao{}
}

//优惠券日志添加
func (d *CouponLogDao) CouponLogSaveDao(param *couponlog.CouponLog) *dingo.ErrorWrap {
	db := global.Orm.Debug().Table("coupon_log")
	db.Create(&param)
	return dingo.ErrorIf(db.Error, true)
}
